﻿using FI.Core.Utilities;
using System;
using System.Collections.Generic;
using System.Net;

namespace FI.Core
{
    /// <summary>
    /// This class defines all predefined errors.
    /// </summary>
	public static partial class Errors
	{
		private static IDictionary<string, ErrorInfo> errors;

		static Errors()
		{
			errors = new Dictionary<string, ErrorInfo>(StringComparer.OrdinalIgnoreCase);
			
			errors["E0001"] = new ErrorInfo("E0001", "Version no cannot be found in request message's If-Match header.", "", (HttpStatusCode)412);
			errors["E0002"] = new ErrorInfo("E0002", "The value of If-Match header is not a valid version No.", "", (HttpStatusCode)412);
			errors["E0003"] = new ErrorInfo("E0003", "The specified version No. does not match the one of existing data.", "", (HttpStatusCode)409);
			errors["E0004"] = new ErrorInfo("E0004", "The data to be updated or deleted does not exist.", "", (HttpStatusCode)400);
			errors["E0005"] = new ErrorInfo("E0005", "It fails to valid input values.", "", (HttpStatusCode)400);
			errors["E0006"] = new ErrorInfo("E0006", "The data to get does not exist.", "", (HttpStatusCode)404);
			errors["E0007"] = new ErrorInfo("E0007", "The request without credential is not authenticated.", "", (HttpStatusCode)401);
			errors["E0008"] = new ErrorInfo("E0008", "The request is not authorized to invoke the target web API.", "", (HttpStatusCode)401);
			errors["E0101"] = new ErrorInfo("E0101", "The specified message entry does not exist.", "", (HttpStatusCode)400);
			errors["E0102"] = new ErrorInfo("E0102", "There is already a message entry of the same category and ID.", "", (HttpStatusCode)400);
			errors["E0103"] = new ErrorInfo("E0103", "Cannot delete the roles which are added into one or more users.", "", (HttpStatusCode)400);
			errors["E0104"] = new ErrorInfo("E0104", "The specified user is already added into the given role.", "", (HttpStatusCode)400);
			errors["E0105"] = new ErrorInfo("E0105", "The specified user is not added into the given role.", "", (HttpStatusCode)400);
			errors["E0201"] = new ErrorInfo("E0201", "The effective durations of a code entry cannot be overlapped.", "", (HttpStatusCode)400);
			errors["E0205"] = new ErrorInfo("E0205", "Cannot update an effective code entry's effective start date.", "", (HttpStatusCode)400);
			errors["E0206"] = new ErrorInfo("E0206", "Don't specify the provider attribute in configuration file.", "", (HttpStatusCode)500);
			errors["E0301"] = new ErrorInfo("E0301", "The specified profile property name is not defined in configuration.", "", (HttpStatusCode)400);
			errors["E0401"] = new ErrorInfo("E0401", "There is already a batch job type of the same name.", "", (HttpStatusCode)400);
			errors["E0402"] = new ErrorInfo("E0402", "The days of week are not specified for 'Weekly' frequency.", "", (HttpStatusCode)400);
			errors["E0403"] = new ErrorInfo("E0403", "There is no available scheduler to access.", "", (HttpStatusCode)500);
			errors["E0404"] = new ErrorInfo("E0404", "There is already a batch job of the same name.", "", (HttpStatusCode)400);
			errors["E0405"] = new ErrorInfo("E0405", "The specified batch job does not exist.", "", (HttpStatusCode)400);
			errors["E0406"] = new ErrorInfo("E0406", "The job is deleted unsuccessfully.", "", (HttpStatusCode)500);
			errors["E0407"] = new ErrorInfo("E0407", "The running job is not found, check please.", "", (HttpStatusCode)400);
			errors["E0408"] = new ErrorInfo("E0408", "The specified history id of batch job is not valid.", "", (HttpStatusCode)400);
			errors["E0409"] = new ErrorInfo("E0409", "Invalid assembly, please check whether the class inherit from BatchJobBase.", "", (HttpStatusCode)400);
			errors["E0410"] = new ErrorInfo("E0410", "Mail message is invalid.", "", (HttpStatusCode)400);
			errors["E0411"] = new ErrorInfo("E0411", "The email category  is not configured.", "", (HttpStatusCode)400);
			errors["E0412"] = new ErrorInfo("E0412", "The configuration element whose name is template provider does not exist.", "", (HttpStatusCode)400);
			errors["E0501"] = new ErrorInfo("E0501", "Some of the selected sessions are not active.", "", (HttpStatusCode)400);
			errors["E0502"] = new ErrorInfo("E0502", "The specified session is not active.", "", (HttpStatusCode)400);
			errors["E0503"] = new ErrorInfo("E0503", "The specified session does not exist or is scavenged.", "", (HttpStatusCode)400);
			errors["E0601"] = new ErrorInfo("E0601", "The specified business action does not exist.", "", (HttpStatusCode)400);
			errors["E0602"] = new ErrorInfo("E0602", "There is already a business action of the same name.", "", (HttpStatusCode)400);
			errors["E0603"] = new ErrorInfo("E0603", "The specified business action(s) is/are already added into the given role.", "", (HttpStatusCode)400);
			errors["E0604"] = new ErrorInfo("E0604", "The specified business action(s) is/are not added into the given role.", "", (HttpStatusCode)400);
			errors["E0701"] = new ErrorInfo("E0701", "The specified role does not exist.", "", (HttpStatusCode)400);
			errors["E0702"] = new ErrorInfo("E0702", "There is already role of the same name.", "", (HttpStatusCode)400);
			errors["E0703"] = new ErrorInfo("E0703", "Cannot delete the roles which are added into one or more users.", "", (HttpStatusCode)400);
			errors["E0704"] = new ErrorInfo("E0704", "The specified user has been added into the given role.", "", (HttpStatusCode)400);
			errors["E0705"] = new ErrorInfo("E0705", "The specified user is not added into the given role.", "", (HttpStatusCode)400);
			errors["E0801"] = new ErrorInfo("E0801", "The specified user account does not exist.", "", (HttpStatusCode)400);
			errors["E0802"] = new ErrorInfo("E0802", "There is already a user account of the same name.", "", (HttpStatusCode)400);
			errors["E0803"] = new ErrorInfo("E0803", "Cannot delete the users which have business actions in them.", "", (HttpStatusCode)400);
			errors["E0804"] = new ErrorInfo("E0804", "The specified role has been added into the given user.", "", (HttpStatusCode)400);
			errors["E0805"] = new ErrorInfo("E0805", "The specified role is not added into the given user.", "", (HttpStatusCode)400);
			errors["E0806"] = new ErrorInfo("E0806", "The specified email address already exists.", "", (HttpStatusCode)400);
			errors["E0807"] = new ErrorInfo("E0807", "The specified new passowrd is too short which not meets the policy.", "", (HttpStatusCode)400);
			errors["E0808"] = new ErrorInfo("E0808", "The specified new passowrd is too long which not meets the policy.", "", (HttpStatusCode)400);
			errors["E0809"] = new ErrorInfo("E0809", "The specified new passowrd must contains specified non-alpha number chars which is not meets the policy.", "", (HttpStatusCode)400);
			errors["E0810"] = new ErrorInfo("E0810", "The specified new password does not match the regular expression.", "", (HttpStatusCode)400);
			errors["E0811"] = new ErrorInfo("E0811", "The specified new password is too long which cannot exceed 128 chars after encrypting.", "", (HttpStatusCode)400);
			errors["E0812"] = new ErrorInfo("E0812", "The specified new password supplied cannot be same as recent old password.", "", (HttpStatusCode)400);
			errors["E0813"] = new ErrorInfo("E0813", "The password must not be same as user name.", "", (HttpStatusCode)400);
			errors["E0814"] = new ErrorInfo("E0814", "The password contains many idential consecutive characters exceed up rule limit, which is not meets the policy.", "", (HttpStatusCode)400);
			errors["E0815"] = new ErrorInfo("E0815", "The password contains key words which is not meets the policy.", "", (HttpStatusCode)400);
			errors["E0816"] = new ErrorInfo("E0816", "The custom password validation failed.", "", (HttpStatusCode)400);
			errors["E0817"] = new ErrorInfo("E0817", "The user status is already active which is cannot changed to active.", "", (HttpStatusCode)400);
			errors["E0818"] = new ErrorInfo("E0818", "The user status is already inactive which is cannot changed to inactive.", "", (HttpStatusCode)400);
			errors["E0819"] = new ErrorInfo("E0819", "The pageIndex/pageSize parameter must be greater than or equal to zero when searching user accounts.", "", (HttpStatusCode)400);
			errors["E0820"] = new ErrorInfo("E0820", "The computation of pageIndex multiply by pageSize cannot exceed the maximum value of System.Int32.", "", (HttpStatusCode)400);
			errors["E0821"] = new ErrorInfo("E0821", "The specified email address is belong to many users.", "", (HttpStatusCode)400);
			errors["E0822"] = new ErrorInfo("E0822", "The specified user account has been locked out.", "", (HttpStatusCode)400);
			errors["E0823"] = new ErrorInfo("E0823", "The password-answer supplied is invalid.", "", (HttpStatusCode)400);
			errors["E0824"] = new ErrorInfo("E0824", "The specified user has not been approved.", "", (HttpStatusCode)400);
			errors["E0825"] = new ErrorInfo("E0825", "The specified user is inactive.", "", (HttpStatusCode)400);
			errors["E0826"] = new ErrorInfo("E0826", "The specified user is suspended.", "", (HttpStatusCode)400);
			errors["E0827"] = new ErrorInfo("E0827", "The password of specified user is initial, for security reason, you are required to change your password at first logon.", "", (HttpStatusCode)400);
			errors["E0828"] = new ErrorInfo("E0828", "The password is expired, for security reason, you are required to change your password at next logon.", "", (HttpStatusCode)400);
			errors["E0829"] = new ErrorInfo("E0829", "The password is not correct.", "", (HttpStatusCode)400);
			errors["E0830"] = new ErrorInfo("E0830", "The specified user name is invalid.", "", (HttpStatusCode)400);
			errors["E0831"] = new ErrorInfo("E0831", "The specified password is invalid.", "", (HttpStatusCode)400);
			errors["E0832"] = new ErrorInfo("E0832", "The specified password question is invalid.", "", (HttpStatusCode)400);
			errors["E0833"] = new ErrorInfo("E0833", "The specified password answer is invalid.", "", (HttpStatusCode)400);
			errors["E0834"] = new ErrorInfo("E0834", "The user creation request was cancelled.", "", (HttpStatusCode)400);
			errors["E0835"] = new ErrorInfo("E0835", "The specified email address is invalid.", "", (HttpStatusCode)400);
			errors["E0836"] = new ErrorInfo("E0836", "There is an error occurred in membership provider.", "", (HttpStatusCode)400);	
		}

		
		/// <summary>
        /// E0001: Version no cannot be found in request message's If-Match header.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0001
        { 
		    get { return errors["E0001"];}
        }
		
		/// <summary>
        /// E0002: The value of If-Match header is not a valid version No.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0002
        { 
		    get { return errors["E0002"];}
        }
		
		/// <summary>
        /// E0003: The specified version No. does not match the one of existing data.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0003
        { 
		    get { return errors["E0003"];}
        }
		
		/// <summary>
        /// E0004: The data to be updated or deleted does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0004
        { 
		    get { return errors["E0004"];}
        }
		
		/// <summary>
        /// E0005: It fails to valid input values.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0005
        { 
		    get { return errors["E0005"];}
        }
		
		/// <summary>
        /// E0006: The data to get does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0006
        { 
		    get { return errors["E0006"];}
        }
		
		/// <summary>
        /// E0007: The request without credential is not authenticated.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0007
        { 
		    get { return errors["E0007"];}
        }
		
		/// <summary>
        /// E0008: The request is not authorized to invoke the target web API.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0008
        { 
		    get { return errors["E0008"];}
        }
		
		/// <summary>
        /// E0101: The specified message entry does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0101
        { 
		    get { return errors["E0101"];}
        }
		
		/// <summary>
        /// E0102: There is already a message entry of the same category and ID.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0102
        { 
		    get { return errors["E0102"];}
        }
		
		/// <summary>
        /// E0103: Cannot delete the roles which are added into one or more users.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0103
        { 
		    get { return errors["E0103"];}
        }
		
		/// <summary>
        /// E0104: The specified user is already added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0104
        { 
		    get { return errors["E0104"];}
        }
		
		/// <summary>
        /// E0105: The specified user is not added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0105
        { 
		    get { return errors["E0105"];}
        }
		
		/// <summary>
        /// E0201: The effective durations of a code entry cannot be overlapped.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0201
        { 
		    get { return errors["E0201"];}
        }
		
		/// <summary>
        /// E0205: Cannot update an effective code entry's effective start date.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0205
        { 
		    get { return errors["E0205"];}
        }
		
		/// <summary>
        /// E0206: Don't specify the provider attribute in configuration file.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0206
        { 
		    get { return errors["E0206"];}
        }
		
		/// <summary>
        /// E0301: The specified profile property name is not defined in configuration.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0301
        { 
		    get { return errors["E0301"];}
        }
		
		/// <summary>
        /// E0401: There is already a batch job type of the same name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0401
        { 
		    get { return errors["E0401"];}
        }
		
		/// <summary>
        /// E0402: The days of week are not specified for 'Weekly' frequency.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0402
        { 
		    get { return errors["E0402"];}
        }
		
		/// <summary>
        /// E0403: There is no available scheduler to access.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0403
        { 
		    get { return errors["E0403"];}
        }
		
		/// <summary>
        /// E0404: There is already a batch job of the same name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0404
        { 
		    get { return errors["E0404"];}
        }
		
		/// <summary>
        /// E0405: The specified batch job does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0405
        { 
		    get { return errors["E0405"];}
        }
		
		/// <summary>
        /// E0406: The job is deleted unsuccessfully.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0406
        { 
		    get { return errors["E0406"];}
        }
		
		/// <summary>
        /// E0407: The running job is not found, check please.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0407
        { 
		    get { return errors["E0407"];}
        }
		
		/// <summary>
        /// E0408: The specified history id of batch job is not valid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0408
        { 
		    get { return errors["E0408"];}
        }
		
		/// <summary>
        /// E0409: Invalid assembly, please check whether the class inherit from BatchJobBase.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0409
        { 
		    get { return errors["E0409"];}
        }
		
		/// <summary>
        /// E0410: Mail message is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0410
        { 
		    get { return errors["E0410"];}
        }
		
		/// <summary>
        /// E0411: The email category  is not configured.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0411
        { 
		    get { return errors["E0411"];}
        }
		
		/// <summary>
        /// E0412: The configuration element whose name is template provider does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0412
        { 
		    get { return errors["E0412"];}
        }
		
		/// <summary>
        /// E0501: Some of the selected sessions are not active.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0501
        { 
		    get { return errors["E0501"];}
        }
		
		/// <summary>
        /// E0502: The specified session is not active.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0502
        { 
		    get { return errors["E0502"];}
        }
		
		/// <summary>
        /// E0503: The specified session does not exist or is scavenged.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0503
        { 
		    get { return errors["E0503"];}
        }
		
		/// <summary>
        /// E0601: The specified business action does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0601
        { 
		    get { return errors["E0601"];}
        }
		
		/// <summary>
        /// E0602: There is already a business action of the same name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0602
        { 
		    get { return errors["E0602"];}
        }
		
		/// <summary>
        /// E0603: The specified business action(s) is/are already added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0603
        { 
		    get { return errors["E0603"];}
        }
		
		/// <summary>
        /// E0604: The specified business action(s) is/are not added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0604
        { 
		    get { return errors["E0604"];}
        }
		
		/// <summary>
        /// E0701: The specified role does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0701
        { 
		    get { return errors["E0701"];}
        }
		
		/// <summary>
        /// E0702: There is already role of the same name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0702
        { 
		    get { return errors["E0702"];}
        }
		
		/// <summary>
        /// E0703: Cannot delete the roles which are added into one or more users.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0703
        { 
		    get { return errors["E0703"];}
        }
		
		/// <summary>
        /// E0704: The specified user has been added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0704
        { 
		    get { return errors["E0704"];}
        }
		
		/// <summary>
        /// E0705: The specified user is not added into the given role.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0705
        { 
		    get { return errors["E0705"];}
        }
		
		/// <summary>
        /// E0801: The specified user account does not exist.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0801
        { 
		    get { return errors["E0801"];}
        }
		
		/// <summary>
        /// E0802: There is already a user account of the same name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0802
        { 
		    get { return errors["E0802"];}
        }
		
		/// <summary>
        /// E0803: Cannot delete the users which have business actions in them.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0803
        { 
		    get { return errors["E0803"];}
        }
		
		/// <summary>
        /// E0804: The specified role has been added into the given user.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0804
        { 
		    get { return errors["E0804"];}
        }
		
		/// <summary>
        /// E0805: The specified role is not added into the given user.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0805
        { 
		    get { return errors["E0805"];}
        }
		
		/// <summary>
        /// E0806: The specified email address already exists.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0806
        { 
		    get { return errors["E0806"];}
        }
		
		/// <summary>
        /// E0807: The specified new passowrd is too short which not meets the policy.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0807
        { 
		    get { return errors["E0807"];}
        }
		
		/// <summary>
        /// E0808: The specified new passowrd is too long which not meets the policy.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0808
        { 
		    get { return errors["E0808"];}
        }
		
		/// <summary>
        /// E0809: The specified new passowrd must contains specified non-alpha number chars which is not meets the policy.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0809
        { 
		    get { return errors["E0809"];}
        }
		
		/// <summary>
        /// E0810: The specified new password does not match the regular expression.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0810
        { 
		    get { return errors["E0810"];}
        }
		
		/// <summary>
        /// E0811: The specified new password is too long which cannot exceed 128 chars after encrypting.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0811
        { 
		    get { return errors["E0811"];}
        }
		
		/// <summary>
        /// E0812: The specified new password supplied cannot be same as recent old password.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0812
        { 
		    get { return errors["E0812"];}
        }
		
		/// <summary>
        /// E0813: The password must not be same as user name.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0813
        { 
		    get { return errors["E0813"];}
        }
		
		/// <summary>
        /// E0814: The password contains many idential consecutive characters exceed up rule limit, which is not meets the policy.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0814
        { 
		    get { return errors["E0814"];}
        }
		
		/// <summary>
        /// E0815: The password contains key words which is not meets the policy.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0815
        { 
		    get { return errors["E0815"];}
        }
		
		/// <summary>
        /// E0816: The custom password validation failed.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0816
        { 
		    get { return errors["E0816"];}
        }
		
		/// <summary>
        /// E0817: The user status is already active which is cannot changed to active.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0817
        { 
		    get { return errors["E0817"];}
        }
		
		/// <summary>
        /// E0818: The user status is already inactive which is cannot changed to inactive.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0818
        { 
		    get { return errors["E0818"];}
        }
		
		/// <summary>
        /// E0819: The pageIndex/pageSize parameter must be greater than or equal to zero when searching user accounts.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0819
        { 
		    get { return errors["E0819"];}
        }
		
		/// <summary>
        /// E0820: The computation of pageIndex multiply by pageSize cannot exceed the maximum value of System.Int32.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0820
        { 
		    get { return errors["E0820"];}
        }
		
		/// <summary>
        /// E0821: The specified email address is belong to many users.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0821
        { 
		    get { return errors["E0821"];}
        }
		
		/// <summary>
        /// E0822: The specified user account has been locked out.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0822
        { 
		    get { return errors["E0822"];}
        }
		
		/// <summary>
        /// E0823: The password-answer supplied is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0823
        { 
		    get { return errors["E0823"];}
        }
		
		/// <summary>
        /// E0824: The specified user has not been approved.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0824
        { 
		    get { return errors["E0824"];}
        }
		
		/// <summary>
        /// E0825: The specified user is inactive.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0825
        { 
		    get { return errors["E0825"];}
        }
		
		/// <summary>
        /// E0826: The specified user is suspended.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0826
        { 
		    get { return errors["E0826"];}
        }
		
		/// <summary>
        /// E0827: The password of specified user is initial, for security reason, you are required to change your password at first logon.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0827
        { 
		    get { return errors["E0827"];}
        }
		
		/// <summary>
        /// E0828: The password is expired, for security reason, you are required to change your password at next logon.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0828
        { 
		    get { return errors["E0828"];}
        }
		
		/// <summary>
        /// E0829: The password is not correct.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0829
        { 
		    get { return errors["E0829"];}
        }
		
		/// <summary>
        /// E0830: The specified user name is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0830
        { 
		    get { return errors["E0830"];}
        }
		
		/// <summary>
        /// E0831: The specified password is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0831
        { 
		    get { return errors["E0831"];}
        }
		
		/// <summary>
        /// E0832: The specified password question is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0832
        { 
		    get { return errors["E0832"];}
        }
		
		/// <summary>
        /// E0833: The specified password answer is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0833
        { 
		    get { return errors["E0833"];}
        }
		
		/// <summary>
        /// E0834: The user creation request was cancelled.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0834
        { 
		    get { return errors["E0834"];}
        }
		
		/// <summary>
        /// E0835: The specified email address is invalid.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0835
        { 
		    get { return errors["E0835"];}
        }
		
		/// <summary>
        /// E0836: There is an error occurred in membership provider.
        /// </summary>
        /// <value>A <see cref="ErrorInfo"/>.</value>
		public static ErrorInfo E0836
        { 
		    get { return errors["E0836"];}
        }
				
		/// <summary>
        /// Tries the get error.
        /// </summary>
        /// <param name="errorCode">The error code.</param>
        /// <param name="error">The error.</param>
        /// <returns><c>true</c> if error is found, <c>false</c> otherwise.</returns>
        public static bool TryGetError(string errorCode, out ErrorInfo error)
        {
            Guard.ArgumentNotNullOrEmpty(errorCode, "errorCode");
            return errors.TryGetValue(errorCode, out error);
        }
		
		/// <summary>
        /// All error codes are defined as constant.
        /// </summary>
		public static class ErrorCodes
		{
            /// <summary>Version no cannot be found in request message's If-Match header.</summary>
			public const string E0001 = "E0001";

            /// <summary>The value of If-Match header is not a valid version No.</summary>
			public const string E0002 = "E0002";

            /// <summary>The specified version No. does not match the one of existing data.</summary>
			public const string E0003 = "E0003";

            /// <summary>The data to be updated or deleted does not exist.</summary>
			public const string E0004 = "E0004";

            /// <summary>It fails to valid input values.</summary>
			public const string E0005 = "E0005";

            /// <summary>The data to get does not exist.</summary>
			public const string E0006 = "E0006";

            /// <summary>The request without credential is not authenticated.</summary>
			public const string E0007 = "E0007";

            /// <summary>The request is not authorized to invoke the target web API.</summary>
			public const string E0008 = "E0008";

            /// <summary>The specified message entry does not exist.</summary>
			public const string E0101 = "E0101";

            /// <summary>There is already a message entry of the same category and ID.</summary>
			public const string E0102 = "E0102";

            /// <summary>Cannot delete the roles which are added into one or more users.</summary>
			public const string E0103 = "E0103";

            /// <summary>The specified user is already added into the given role.</summary>
			public const string E0104 = "E0104";

            /// <summary>The specified user is not added into the given role.</summary>
			public const string E0105 = "E0105";

            /// <summary>The effective durations of a code entry cannot be overlapped.</summary>
			public const string E0201 = "E0201";

            /// <summary>Cannot update an effective code entry's effective start date.</summary>
			public const string E0205 = "E0205";

            /// <summary>Don't specify the provider attribute in configuration file.</summary>
			public const string E0206 = "E0206";

            /// <summary>The specified profile property name is not defined in configuration.</summary>
			public const string E0301 = "E0301";

            /// <summary>There is already a batch job type of the same name.</summary>
			public const string E0401 = "E0401";

            /// <summary>The days of week are not specified for 'Weekly' frequency.</summary>
			public const string E0402 = "E0402";

            /// <summary>There is no available scheduler to access.</summary>
			public const string E0403 = "E0403";

            /// <summary>There is already a batch job of the same name.</summary>
			public const string E0404 = "E0404";

            /// <summary>The specified batch job does not exist.</summary>
			public const string E0405 = "E0405";

            /// <summary>The job is deleted unsuccessfully.</summary>
			public const string E0406 = "E0406";

            /// <summary>The running job is not found, check please.</summary>
			public const string E0407 = "E0407";

            /// <summary>The specified history id of batch job is not valid.</summary>
			public const string E0408 = "E0408";

            /// <summary>Invalid assembly, please check whether the class inherit from BatchJobBase.</summary>
			public const string E0409 = "E0409";

            /// <summary>Mail message is invalid.</summary>
			public const string E0410 = "E0410";

            /// <summary>The email category  is not configured.</summary>
			public const string E0411 = "E0411";

            /// <summary>The configuration element whose name is template provider does not exist.</summary>
			public const string E0412 = "E0412";

            /// <summary>Some of the selected sessions are not active.</summary>
			public const string E0501 = "E0501";

            /// <summary>The specified session is not active.</summary>
			public const string E0502 = "E0502";

            /// <summary>The specified session does not exist or is scavenged.</summary>
			public const string E0503 = "E0503";

            /// <summary>The specified business action does not exist.</summary>
			public const string E0601 = "E0601";

            /// <summary>There is already a business action of the same name.</summary>
			public const string E0602 = "E0602";

            /// <summary>The specified business action(s) is/are already added into the given role.</summary>
			public const string E0603 = "E0603";

            /// <summary>The specified business action(s) is/are not added into the given role.</summary>
			public const string E0604 = "E0604";

            /// <summary>The specified role does not exist.</summary>
			public const string E0701 = "E0701";

            /// <summary>There is already role of the same name.</summary>
			public const string E0702 = "E0702";

            /// <summary>Cannot delete the roles which are added into one or more users.</summary>
			public const string E0703 = "E0703";

            /// <summary>The specified user has been added into the given role.</summary>
			public const string E0704 = "E0704";

            /// <summary>The specified user is not added into the given role.</summary>
			public const string E0705 = "E0705";

            /// <summary>The specified user account does not exist.</summary>
			public const string E0801 = "E0801";

            /// <summary>There is already a user account of the same name.</summary>
			public const string E0802 = "E0802";

            /// <summary>Cannot delete the users which have business actions in them.</summary>
			public const string E0803 = "E0803";

            /// <summary>The specified role has been added into the given user.</summary>
			public const string E0804 = "E0804";

            /// <summary>The specified role is not added into the given user.</summary>
			public const string E0805 = "E0805";

            /// <summary>The specified email address already exists.</summary>
			public const string E0806 = "E0806";

            /// <summary>The specified new passowrd is too short which not meets the policy.</summary>
			public const string E0807 = "E0807";

            /// <summary>The specified new passowrd is too long which not meets the policy.</summary>
			public const string E0808 = "E0808";

            /// <summary>The specified new passowrd must contains specified non-alpha number chars which is not meets the policy.</summary>
			public const string E0809 = "E0809";

            /// <summary>The specified new password does not match the regular expression.</summary>
			public const string E0810 = "E0810";

            /// <summary>The specified new password is too long which cannot exceed 128 chars after encrypting.</summary>
			public const string E0811 = "E0811";

            /// <summary>The specified new password supplied cannot be same as recent old password.</summary>
			public const string E0812 = "E0812";

            /// <summary>The password must not be same as user name.</summary>
			public const string E0813 = "E0813";

            /// <summary>The password contains many idential consecutive characters exceed up rule limit, which is not meets the policy.</summary>
			public const string E0814 = "E0814";

            /// <summary>The password contains key words which is not meets the policy.</summary>
			public const string E0815 = "E0815";

            /// <summary>The custom password validation failed.</summary>
			public const string E0816 = "E0816";

            /// <summary>The user status is already active which is cannot changed to active.</summary>
			public const string E0817 = "E0817";

            /// <summary>The user status is already inactive which is cannot changed to inactive.</summary>
			public const string E0818 = "E0818";

            /// <summary>The pageIndex/pageSize parameter must be greater than or equal to zero when searching user accounts.</summary>
			public const string E0819 = "E0819";

            /// <summary>The computation of pageIndex multiply by pageSize cannot exceed the maximum value of System.Int32.</summary>
			public const string E0820 = "E0820";

            /// <summary>The specified email address is belong to many users.</summary>
			public const string E0821 = "E0821";

            /// <summary>The specified user account has been locked out.</summary>
			public const string E0822 = "E0822";

            /// <summary>The password-answer supplied is invalid.</summary>
			public const string E0823 = "E0823";

            /// <summary>The specified user has not been approved.</summary>
			public const string E0824 = "E0824";

            /// <summary>The specified user is inactive.</summary>
			public const string E0825 = "E0825";

            /// <summary>The specified user is suspended.</summary>
			public const string E0826 = "E0826";

            /// <summary>The password of specified user is initial, for security reason, you are required to change your password at first logon.</summary>
			public const string E0827 = "E0827";

            /// <summary>The password is expired, for security reason, you are required to change your password at next logon.</summary>
			public const string E0828 = "E0828";

            /// <summary>The password is not correct.</summary>
			public const string E0829 = "E0829";

            /// <summary>The specified user name is invalid.</summary>
			public const string E0830 = "E0830";

            /// <summary>The specified password is invalid.</summary>
			public const string E0831 = "E0831";

            /// <summary>The specified password question is invalid.</summary>
			public const string E0832 = "E0832";

            /// <summary>The specified password answer is invalid.</summary>
			public const string E0833 = "E0833";

            /// <summary>The user creation request was cancelled.</summary>
			public const string E0834 = "E0834";

            /// <summary>The specified email address is invalid.</summary>
			public const string E0835 = "E0835";

            /// <summary>There is an error occurred in membership provider.</summary>
			public const string E0836 = "E0836";

       }	
	}
}